<div class="row" style="height:100%;">
	<div class="col-lg-12" style="border-right:1px solid #e6e6e6;padding-right:0px;">
		<h1 class="site-h1" style="background-color:#FFFFFF;">
			分机列表<#if extentionList??>（${extentionList?size}）</#if>
			<span style="float:right;">
				<button class="layui-btn layui-btn-small green" href="/admin/callcenter/extention/add.html?hostid=${pbxHost.id!''}" data-toggle="ajax" data-width="700" data-height="450" data-title="添加新分机">
					添加分机（支持批量添加）
				</button>
				
			</span>
		</h1>
		<div class="row">
			<div class="col-lg-12">
				<div class="row" style="padding:5px;">
					<div class="col-lg-12">
						<table class="layui-table" lay-skin="line">
						  <colgroup>
								<col width="20%">
								<col width="10%">
								<col width="10%">
								<col width="20%">
								<col width="10%">
								<col width="10%">
								<col width="12%">
								<col width="1%">
								<col>
						  </colgroup>
						  <thead>
							<tr>
							  <th>分机号</th>
							  <th>外呼</th>
							  <th>录音</th>
							  <th>播报工号</th>
							  <th>类型</th>
							  <th>SIP网关</th>
							  <th>启用WebRTC</th>
							  <th style="white-space:nowrap;" nowrap="nowrap">操作</th>
							</tr> 
						  </thead>
						  <tbody>
							<#if extentionList??>
							<#list extentionList as extention>
							<tr>
							  <td>
									${extention.extention!''}<#if extention.description?? && extention.description != "">（${extention.description!''}）</#if>
							  </td>
							  <td>
									<#if extention.callout>
								  		<i class="layui-icon" style="color:#19a55d;">&#xe618;</i>
								  	</#if>
							  </td>
							  <td>
									<#if extention.record>
								  		<i class="layui-icon" style="color:#19a55d;">&#xe618;</i>
								  	</#if>
							  </td>
							  <td>
									<#if extention.playnum>
								  		<i class="layui-icon" style="color:#19a55d;" title="${extention.mediapath!''}">&#xe618;</i>
								  		<span  title="${extention.mediapath!''}"><#if extention.mediapath?? && extention.mediapath!="">播报文件已设置</#if></span>
								  	</#if>
							  </td>
							  <td>
									<#if extention.extype?? && extention.extype == "line">直线</#if>
									<#if extention.extype?? && extention.extype == "ivr">
										
										<#if extention.enableai?? && extention.enableai == "1">
										智能IVR<i class="kfont" style="position: relative;" title="启用智能 机器人">&#xe63a;</i>
										<#else>
										IVR
										</#if>
									</#if>
									<#if extention.extype?? && extention.extype == "skill">技能组</#if>
									<#if extention.extype?? && extention.extype == "conference">会议</#if>
									<#if extention.extype?? && extention.extype == "quene">队列</#if>
							  </td>
							  <td>
									<#if extention.siptrunk?? && extention.siptrunk!="">
									<i class="layui-icon" style="color:#19a55d;">&#xe618;</i>
									</#if>
							  </td>
							  <td>
									<#if extention.enablewebrtc?? && extention.enablewebrtc == true>
									<i class="layui-icon" style="color:#19a55d;">&#xe618;</i>
									</#if>
							  </td>
							  <td style="white-space:nowrap;" nowrap="nowrap">
							  		<a href="/admin/callcenter/extention/edit.html?id=${extention.id!''}&hostid=${pbxHost.id!''}" data-toggle="ajax" data-width="700" data-height="450" data-title="编辑分机信息">
							  			<i class="layui-icon">&#xe642;</i>
							  			编辑
							  		</a>
							  		<#if extention.extype?? && extention.extype == "ivr">
							  		<a href="/admin/callcenter/extention/ivr.html?id=${extention.id!''}&hostid=${pbxHost.id!''}" style="margin-left:10px;" data-toggle="ajax" data-width="700" data-height="450" data-title="编辑IVR配置信息">
							  			<i class="kfont">&#xe66f;</i>
							  			IVR配置
							  		</a>
							  		
							  		</#if>
							  		<a href="/admin/callcenter/extention/delete.html?id=${extention.id!''}&hostid=${pbxHost.id!''}" style="margin-left:10px;" data-toggle="tip" data-callback="loadURL" data-target="#callCenterContent" data-title="请确认是否删除分机号？">
							  			<i class="layui-icon" style="color:red;">&#x1006;</i>
							  			删除
							  		</a>
							  </td>
							</tr>
							</#list>
							</#if>
						  </tbody>
						</table>
					</div> 	   
				</div>
			</div>	
		</div>
	</div>	
</div>
